<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 1、在遍历对象的过程中，只获取一个值，那么获取到的时value -->
        <ul>
            <li v-for="item in person">{{item}}</li>
        </ul>

        <!-- 2、获取key和value(value,key) -->
        <ul>
            <li v-for="(value,key) in person">{{key}}-->{{value}}</li>
        </ul>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: '我是你爹!',
                person: {
                    name: 'name',
                    age: 18,
                    sex: '男',
                }
            },
            methods: {}
        });
    </script>
</body>

</html>